package org.apache.mina.filter.codec.protobuf;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolDecoder;
import org.apache.mina.filter.codec.ProtocolEncoder;

/**
 * ProtocolCodecFactory
 */
public class ProtobufCodecFactory implements ProtocolCodecFactory  {

	private static final ProtobufEncoder ENCODER_INSTANCE = new ProtobufEncoder(); 
	private static final ProtobufDecoder DECODER_INSTANCE = new ProtobufDecoder(); 
	
	public ProtobufCodecFactory() {
		
	}
	
	public ProtocolDecoder getDecoder(IoSession session) throws Exception {
		return DECODER_INSTANCE;
	}

	public ProtocolEncoder getEncoder(IoSession session) throws Exception {
		return ENCODER_INSTANCE;
	}	
	
}
